package dao

import "gorm.io/gorm"

// 医生信息
type Doctor struct {
	gorm.Model
	Name      string  `gorm:"type:varchar(15);not null;comment:医生姓名"`
	Img       string  `gorm:"type:varchar(255);not null;comment:上传头像"`
	School    int     `gorm:"type:tinyint;not null;comment:所属院区"`
	Room      int     `gorm:"type:tinyint;not null;comment:所属科室"`
	Work      int     `gorm:"type:tinyint;not null;comment:医生职务"`
	Status    int     `gorm:"type:tinyint;not null;comment:医生标签"`
	Price     float64 `gorm:"type:decimal(10,2);not null;comment:挂号费用"`
	LookPrice float64 `gorm:"type:decimal(10,2);not null;comment:诊查费"`
	Intro     string  `gorm:"type:varchar(255);not null;comment:医生简介"`
	Person    Person
	Message   Message
}

// 患者信息
type Person struct {
	gorm.Model
	Name     string `gorm:"type:varchar(15);not null;comment:患者姓名"`
	Card     string `gorm:"type:varchar(16);not null;comment:就诊卡号"`
	WXNick   string `gorm:"type:varchar(16);not null;comment:微信昵称"`
	Address  string `gorm:"type:varchar(25);not null;comment:就诊人地址"`
	Tel      string `gorm:"type:char(11);not null;comment:号码"`
	IdCard   string `gorm:"type:varchar(18);not null;comment:身份证号码"`
	DoctorId int
	Message  Message
}

// 预约信息表
type Message struct {
	gorm.Model
	Hospital string  `gorm:"type:varchar(15);not null;comment:就诊医院"`
	Doctor   string  `gorm:"type:varchar(15);not null;comment:就诊医生"`
	Address  string  `gorm:"type:varchar(15);not null;comment:就诊地址"`
	Room     string  `gorm:"type:varchar(15);not null;comment:就诊科室"`
	Status   string  `gorm:"type:varchar(15);not null;comment:挂号状态"`
	Price    float64 `gorm:"type:decimal(10,2);not null;comment:挂号价格"`
	Intro    string  `gorm:"type:varchar(255);not null;comment:备注"`
	DoctorId int
	PersonId int
}
